import re, json, pickle

import urllib.request
# #\w 字母 数字 下划线 \W  换行符
# a = 'skjhdfkashkhakhk123kjhk3j1h123_\r123k3h12k31k'
# re = re.findall('\W',a)
#
# # url= "http://www.baidu.com"
# # data = urllib.request.urlopen(url).read()#
# # data = data.decode('UTF-8')
# # print(data)
# # print(re)
# import urllib
# import urllib.request
# data={}
#data['word']='one peace'
#url_values=urllib.parse.urlencode(data)
url="http://www.baidu.com/s?"
full_url=url
a = urllib.request.urlopen(full_url)
data=a.read()
data=data.decode('UTF-8')
print(data)
##打印出网址：
a.geturl()


# language = 'Pytho\\nnn\n123 php python java'
# r = re.findall('pytho.n',language,re.I|re.S)
# print(r)
#
#
json_str = '[{"name":"lisi","age":18},{"name":"lisi","age":18}]'

# poeple = json.dumps(json_str)
# s = json.loads(json_str)
# ss = json.dumps(json_str)
# print(type(s))
# print(poeple)
# print(s)
# print(s['name'])
# print(ss)

# json_str2 = [
#     {'name': "lisi",
#      'age': 18},
#     {'name': "lisi",
#      'age': 18},
#
# ]
# pepole = json.dumps(json_str2)
#
# print(type(pepole))
# print(type(json_str2))
# print(pepole)
#
# data = {
#     'name': "lixin",
#     'sex': "female",
#     'height': 1.58,
#     'weight': 82,
#     'utterance': '奏是这么瘦,来打我啊'
# }
# print(type(data))
